home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / turttleo.swf / scripts / DefineSprite_122 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  398 b   |  23 lines

  1. function SetValue(val)
  2. {
  3.    this.Value = Math.floor(Math.max(0,Math.min(7,val)));
  4.    Update();
  5. }
  6. function Update()
  7. {
  8.    var _loc2_ = 1;
  9.    while(_loc2_ < 8)
  10.    {
  11.       var _loc4_ = "shell" + _loc2_;
  12.       var _loc3_ = Value >= _loc2_;
  13.       this[_loc4_]._visible = _loc3_;
  14.       _loc2_ = _loc2_ + 1;
  15.    }
  16. }
  17. var Value;
  18. if(Value == undefined)
  19. {
  20.    Value = 0;
  21. }
  22. SetValue(Value);
  23.